Skip to content
This repository has been archived by the owner on Mar 1, 2021. It is now read-only.

HW5 Vasekha #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

HW5 Vasekha #11

wants to merge 3 commits into from

Conversation

irvasek
Copy link

@irvasek irvasek commented Apr 19, 2019

No description provided.

@otopba otopba self-requested a review April 20, 2019 10:49
Copy link

@otopba otopba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Код аккуратный.
Но механика игры не понятно, иногда не получается кинуть мяч, иногда мяч пропадает с экрана

private ImageView ballView;
private ScoreView scoreView;
private ImageView hoopView;
private Button resetButton;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может быть локальной переменной

public void incrementScore() {
score++;
if (score > 39) {
paint.setColor(getResources().getColor(R.color.colorGold));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Цвета лучше заранее считать и тут только ставить их

starBlockMidX = starBlockWidth / 2f;
starBlockMidY = h / 2f;
starDiam = Math.min(starBlockMidX, starBlockMidY);
paint.setColor(getResources().getColor(R.color.colorBlack));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот цвет можно поставить один раз

@irvasek
Copy link
Author

irvasek commented Apr 20, 2019

Исправила замечания, теперь мяч не исчезает, добавила пролет мяча через корзину при попадании

@otopba
Copy link

otopba commented Apr 21, 2019

Работа принята
10 балов

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants